package com.ymatou.iapi.productsync.service;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.MapUtil;

public class EsCall extends YmatouAutoTestCall {
	private static String opurl="api/commandsync";
	
	public EsCall(){
		super("http://productsynces.iapi.ymatou.com/", opurl, "POST", "JSON");
	}
	
	
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	

	public JSONObject callAndGetReturnData(int activityId,String productId,String actionType){
		
		
		return callAndGetReturnData(MapUtil.hashMap("ActivityId", activityId,"ProductId",productId,"ActionType",actionType,"TransactionId",0));
	}

	
	
	

	public static void main(String[] args) {
		JSONObject aa = new EsCall().callAndGetReturnData(0,"1d09bc0f-e5d0-44ff-bc6f-b6c5b38a5fc9","AddProduct");
	}

}
